package cc.rengu.redp.bizimpl.upmp.common;

public class Message {
	private SecInHead secInHead;
	private BusInBody busInBody;
	private SecOutHead secOutHead;
	private BusOutBody busOutBody;
	
	public SecInHead getSecInHead() {
		return secInHead;
	}

	public void setSecInHead(SecInHead secInHead) {
		this.secInHead = secInHead;
	}

	public BusInBody getBusInBody() {
		return busInBody;
	}

	public void setBusInBody(BusInBody busInBody) {
		this.busInBody = busInBody;
	}
	
	public SecOutHead getSecOutHead() {
		return secOutHead;
	}

	public void setSecOutHead(SecOutHead secOutHead) {
		this.secOutHead = secOutHead;
	}

	public BusOutBody getBusOutBody() {
		return busOutBody;
	}

	public void setBusOutBody(BusOutBody busOutBody) {
		this.busOutBody = busOutBody;
	}

	public Message(SecInHead secInHead, BusInBody busInBody) {
		super();
		this.secInHead = secInHead;
		this.busInBody = busInBody;
	}

	public Message(SecOutHead secOutHead, BusOutBody busOutBody) {
		super();
		this.secOutHead = secOutHead;
		this.busOutBody = busOutBody;
	}

	public Message() {
		super();
	}

	

	@Override
	public String toString() {
		return "Message [secInHead=" + secInHead.toString() + ", busInBody=" + busInBody.toString() + ", secOutHead=" + secOutHead.toString()
				+ ", busOutBody=" + busOutBody.toString() + "]";
	}



	public class SecInHead{
		/** 当前交易日期 */
		private String transDate    ;
		/** 流水号，随机生成不重复就行 */
		private String serialNo     ;
		/** 渠道分配的密码 */
		private String channelPass  ;
		/** 当前交易时间 */
		private String transTime    ;
		/** 目标系统，固定值900001 */
		private String askforSys    ;
		/** 交易码，针对发送微信接口调用IN0004 */
		private String transCode    ;
		/** 渠道号 */
		private String channelNo    ;
		
		public String getTransDate() {
			return transDate;
		}
		public void setTransDate(String transDate) {
			this.transDate = transDate;
		}
		public String getSerialNo() {
			return serialNo;
		}
		public void setSerialNo(String serialNo) {
			this.serialNo = serialNo;
		}
		public String getChannelPass() {
			return channelPass;
		}
		public void setChannelPass(String channelPass) {
			this.channelPass = channelPass;
		}
		public String getTransTime() {
			return transTime;
		}
		public void setTransTime(String transTime) {
			this.transTime = transTime;
		}
		public String getAskforSys() {
			return askforSys;
		}
		public void setAskforSys(String askforSys) {
			this.askforSys = askforSys;
		}
		public String getTransCode() {
			return transCode;
		}
		public void setTransCode(String transCode) {
			this.transCode = transCode;
		}
		
		public String getChannelNo() {
			return channelNo;
		}
		public void setChannelNo(String channelNo) {
			this.channelNo = channelNo;
		}
		@Override
		public String toString() {
			return "SecInHead [transDate=" + transDate + ", serialNo=" + serialNo + ", channelPass=" + channelPass
					+ ", transTime=" + transTime + ", askforSys=" + askforSys+",channelNo="+channelNo + ", transCode=" + transCode + "]";
		}
		
		public SecInHead(String transDate, String serialNo, String channelPass, String transTime, String askforSys,
                         String transCode, String channelNo) {
			super();
			this.transDate = transDate;
			this.serialNo = serialNo;
			this.channelPass = channelPass;
			this.transTime = transTime;
			this.askforSys = askforSys;
			this.transCode = transCode;
			this.channelNo = channelNo;
		}
		public SecInHead() {
			super();
		}
	}

	public class BusInBody{
		/** 发送的模板类型,暂定busyCheck表示商户进件通知模板 */
		private String busyTp  ;
		/** 商户名称 */
		private String busyNm  ;
		/** 商户号 */
		private String busyNo  ;
		/** 联系人电话 */
		private String teleNo  ;
		/** 关联公众号的openId */
		private String openId  ;
		/** 跳转链接 */
		private String busUrl ;
		/** 接收人名称 */
		private String userNm ;
		
		public String getBusyTp() {
			return busyTp;
		}
		public void setBusyTp(String busyTp) {
			this.busyTp = busyTp;
		}
		public String getBusyNm() {
			return busyNm;
		}
		public void setBusyNm(String busyNm) {
			this.busyNm = busyNm;
		}
		public String getBusyNo() {
			return busyNo;
		}
		public void setBusyNo(String busyNo) {
			this.busyNo = busyNo;
		}
		public String getTeleNo() {
			return teleNo;
		}
		public void setTeleNo(String teleNo) {
			this.teleNo = teleNo;
		}
		public String getOpenId() {
			return openId;
		}
		public void setOpenId(String openId) {
			this.openId = openId;
		}
		
		public String getBusUrl() {
			return busUrl;
		}
		public void setBusUrl(String busUrl) {
			this.busUrl = busUrl;
		}
		
		public String getUserNm() {
			return userNm;
		}
		public void setUserNm(String userNm) {
			this.userNm = userNm;
		}

		@Override
		public String toString() {
			return "BusInBody [busyTp=" + busyTp + ", busyNm=" + busyNm + ", busyNo=" + busyNo + ", teleNo=" + teleNo
					+ ", openId=" + openId + ", busUrl=" + busUrl + ", userNm=" + userNm + "]";
		}
		
		
		public BusInBody(String busyTp, String busyNm, String busyNo, String teleNo, String openId, String busUrl,
                         String userNm) {
			super();
			this.busyTp = busyTp;
			this.busyNm = busyNm;
			this.busyNo = busyNo;
			this.teleNo = teleNo;
			this.openId = openId;
			this.busUrl = busUrl;
			this.userNm = userNm;
		}
		public BusInBody() {
			
		}
		
	}

	
	
	/**
	 * 对于与json字符串映射的类，类中采用了内部类，出现不能使用的情况，一定到给这个内部类加上static修饰。
	 * @author Daniel
	 *
	 */
	public static class BusOutBody{
		private String errcode;
		private String errmsg;
		private String msgid;
		public String getErrcode() {
			return errcode;
		}
		public void setErrcode(String errcode) {
			this.errcode = errcode;
		}
		public String getErrmsg() {
			return errmsg;
		}
		public void setErrmsg(String errmsg) {
			this.errmsg = errmsg;
		}
		public String getMsgid() {
			return msgid;
		}
		public void setMsgid(String msgid) {
			this.msgid = msgid;
		}
		
		
		@Override
		public String toString() {
			return "MsgResult [errcode=" + errcode + ", errmsg=" + errmsg + ", msgid=" + msgid + "]";
		}
		public BusOutBody(String errcode, String errmsg, String msgid) {
			super();
			this.errcode = errcode;
			this.errmsg = errmsg;
			this.msgid = msgid;
		}
		public BusOutBody() {
			super();
		}
		
	}
	
	public static class SecOutHead{
		/** 当前交易日期 */
		private String transDate    ;
		/** 流水号，随机生成不重复就行 */
		private String serialNo     ;
		/** 当前交易时间 */
		private String transTime    ;
		/** 渠道号 */
		private String channelNo    ;
		
		private String securCode;
		private String securMsg;
		public String getTransDate() {
			return transDate;
		}
		public void setTransDate(String transDate) {
			this.transDate = transDate;
		}
		public String getSerialNo() {
			return serialNo;
		}
		public void setSerialNo(String serialNo) {
			this.serialNo = serialNo;
		}
		public String getTransTime() {
			return transTime;
		}
		public void setTransTime(String transTime) {
			this.transTime = transTime;
		}
		public String getChannelNo() {
			return channelNo;
		}
		public void setChannelNo(String channelNo) {
			this.channelNo = channelNo;
		}
		public String getSecurCode() {
			return securCode;
		}
		public void setSecurCode(String securCode) {
			this.securCode = securCode;
		}
		public String getSecurMsg() {
			return securMsg;
		}
		public void setSecurMsg(String securMsg) {
			this.securMsg = securMsg;
		}
		public SecOutHead(String transDate, String serialNo, String transTime, String channelNo, String securCode,
                          String securMsg) {
			super();
			this.transDate = transDate;
			this.serialNo = serialNo;
			this.transTime = transTime;
			this.channelNo = channelNo;
			this.securCode = securCode;
			this.securMsg = securMsg;
		}
		public SecOutHead() {
			super();
		}
		
		
	} 
}
